﻿<phone:PhoneApplicationPage
     x:Class="PhoneInfo.Page.MobileProduct"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" 
   
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" toolkit:TiltEffect.IsTiltEnabled="True" 
    xmlns:delay="clr-namespace:Delay;assembly=PhonePerformance"
    Loaded="PhoneApplicationPage_Loaded" Style="{StaticResource TransitionPageStyle}"
   
    >
    <phone:PhoneApplicationPage.Resources>
        <shell:ApplicationBar x:Key="AppBarSearch"  BackgroundColor="#0a76d2" ForegroundColor="#ffffffff">
            <shell:ApplicationBarIconButton  IconUri="Icon/info/i_search.png"    Text="搜索" Click="search"/>
        </shell:ApplicationBar>
        <shell:ApplicationBar x:Key="AppBarSendSearch"  BackgroundColor="#0a76d2" ForegroundColor="#ffffffff">
            <shell:ApplicationBarIconButton IconUri="Icon/info/i_yes.png" Text="搜索" Click="send"/>
            <shell:ApplicationBarIconButton IconUri="Icon/info/i_cancel.png" Text="取消" Click="cancel"/>
        </shell:ApplicationBar>
        <shell:ApplicationBar x:Key="AppBarSearch1"  BackgroundColor="#212121" ForegroundColor="#ffffffff">
            <shell:ApplicationBarIconButton  IconUri="Icon/black/i_search.png"    Text="搜索" Click="search"/>
        </shell:ApplicationBar>
        <shell:ApplicationBar x:Key="AppBarSendSearch1"  BackgroundColor="#212121" ForegroundColor="#ffffffff">
            <shell:ApplicationBarIconButton IconUri="Icon/black/i_yes.png" Text="搜索" Click="send"/>
            <shell:ApplicationBarIconButton IconUri="Icon/black/i_cancel.png" Text="取消" Click="cancel"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.Resources>
    <Grid x:Name="LayoutRoot" Background="{Binding Source={StaticResource Theme}, Path=cuTheme.TextBrush}">        
        <Grid.RowDefinitions>
            <RowDefinition Height="10"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <controls:Pivot Margin="0,-10,0,0"  x:Name="mainPivot" Grid.Row="1" SelectionChanged="Pivot_SelectionChanged" d:IsHidden="True">
    		<controls:PivotItem  x:Name="Europe_and_American" Margin="12,0">
                <controls:PivotItem.Header>
                    <TextBlock Text="欧美"   Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.TitleBrush}" 
                               FontSize="50" />
                </controls:PivotItem.Header>
    				<Grid Width="456" Margin="0">
                    <ListBox ItemsSource="{Binding TypeAreaItems}" Loaded="ListBox_Loaded"   Tap="ListBox_Tap" Margin="0,0,0,7">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel></StackPanel>
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <delay:FoodTemplateSelector x:Name="foodTemplateSelector" Content="{Binding}" RenderTransformOrigin="0.5,0.5">
                                    <delay:FoodTemplateSelector.RenderTransform>
                                        <CompositeTransform/>
                                    </delay:FoodTemplateSelector.RenderTransform>
                                    <delay:FoodTemplateSelector.Main>
                                        <DataTemplate >
                                            <StackPanel Orientation="Horizontal" Margin="10">
                                                <Ellipse Width="10" Height="10" Margin="0"
                                                  Stroke="#00ffffff"
                                                  StrokeThickness="1">
                                                    <Ellipse.Fill>
                                                        <SolidColorBrush Color="#025fae"/>
                                                    </Ellipse.Fill>
                                                </Ellipse>
                                                <TextBlock Margin="15,0,0,0" TextWrapping="Wrap" Text="{Binding  Ppname}"  
												           Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.BlueAndBlack}" 
														   FontSize="30"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="(" 
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="{Binding Pnums}" 
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="款)"
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                            </StackPanel>
                                        </DataTemplate>
                                    </delay:FoodTemplateSelector.Main>
                                    <delay:FoodTemplateSelector.Tail>
                                        <DataTemplate >
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock TextWrapping="Wrap"   Text="{Binding  Ppname}" FontSize="24"
                                                           Foreground="{Binding cuTheme.lexunTBForgetBrush, Source={StaticResource Theme}}"/>
                                            </StackPanel>
                                        </DataTemplate>
                                    </delay:FoodTemplateSelector.Tail>
                                </delay:FoodTemplateSelector>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <Canvas x:Name="EuropeAndAmerican_result" HorizontalAlignment="Center" Height="30" VerticalAlignment="Center" Width="300" Visibility="Collapsed">
                            <TextBlock TextWrapping="Wrap" Text="没有找到响应的信息"/>
                        </Canvas>
                    </Grid>
    		</controls:PivotItem>
            <controls:PivotItem   x:Name="Japan_and_Krean" Margin="12,0" >
                <controls:PivotItem.Header>
                    <TextBlock Text="日韩"  Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.TitleBrush}"  FontSize="50" />
                </controls:PivotItem.Header>
                <Grid>
                    <ListBox ItemsSource="{Binding TypeAreaItems}" Loaded="ListBox_Loaded"   Tap="ListBox_Tap">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <delay:FoodTemplateSelector x:Name="foodTemplateSelector" Content="{Binding}" RenderTransformOrigin="0.5,0.5">
                                    <delay:FoodTemplateSelector.RenderTransform>
                                        <CompositeTransform/>
                                    </delay:FoodTemplateSelector.RenderTransform>
                                    <delay:FoodTemplateSelector.Main>
                                        <DataTemplate >
                                            <StackPanel Orientation="Horizontal" Margin="10">
                                                <Ellipse Width="10" Height="10" Margin="0"
                                                  Stroke="#00ffffff"
                                                  StrokeThickness="1">
                                                    <Ellipse.Fill>
                                                        <SolidColorBrush Color="#025fae"/>
                                                    </Ellipse.Fill>
                                                </Ellipse>
                                                 <TextBlock Margin="15,0,0,0" TextWrapping="Wrap" Text="{Binding  Ppname}"  
												           Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.BlueAndBlack}" 
														   FontSize="30"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="(" 
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="{Binding Pnums}" 
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="款)"
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                            </StackPanel>
                                        </DataTemplate>
                                    </delay:FoodTemplateSelector.Main>
                                    <delay:FoodTemplateSelector.Tail>
                                        <DataTemplate >
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock TextWrapping="Wrap" Text="{Binding  Ppname}" Width="200" Height="80"/>

                                            </StackPanel>
                                        </DataTemplate>
                                    </delay:FoodTemplateSelector.Tail>
                                </delay:FoodTemplateSelector>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                    <Canvas x:Name="JapenAndKrean_result" HorizontalAlignment="Center" Height="30" VerticalAlignment="Center" Width="300" Visibility="Collapsed">
                    	<TextBlock TextWrapping="Wrap" Text="没有找到响应的信息"/>
                    </Canvas>
                </Grid>
    		</controls:PivotItem>
            <controls:PivotItem x:Name="Local" Margin="12,0">
                <controls:PivotItem.Header>
                    <TextBlock Text="国产"   Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.TitleBrush}"  FontSize="50" />
                </controls:PivotItem.Header>
                <Grid>
                    <ListBox ItemsSource="{Binding TypeAreaItems}" Loaded="ListBox_Loaded"   Tap="ListBox_Tap">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <delay:FoodTemplateSelector x:Name="foodTemplateSelector" Content="{Binding}" RenderTransformOrigin="0.5,0.5">
                                    <delay:FoodTemplateSelector.RenderTransform>
                                        <CompositeTransform/>
                                    </delay:FoodTemplateSelector.RenderTransform>
                                    <delay:FoodTemplateSelector.Main>
                                        <DataTemplate >
                                            <StackPanel Orientation="Horizontal" Margin="10">
                                                <Ellipse Width="10" Height="10" Margin="0"
                                                  Stroke="#00ffffff"
                                                  StrokeThickness="1">
                                                    <Ellipse.Fill>
                                                        <SolidColorBrush Color="#025fae"/>
                                                    </Ellipse.Fill>
                                                </Ellipse>
                                                 <TextBlock Margin="15,0,0,0" TextWrapping="Wrap" Text="{Binding  Ppname}"  
												           Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.BlueAndBlack}" 
														   FontSize="30"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="(" 
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="{Binding Pnums}" 
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="款)"
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                            </StackPanel>
                                        </DataTemplate>
                                    </delay:FoodTemplateSelector.Main>
                                    <delay:FoodTemplateSelector.Tail>
                                        <DataTemplate >
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock TextWrapping="Wrap" Text="{Binding  Ppname}" Width="200" Height="80"/>

                                            </StackPanel>
                                        </DataTemplate>
                                    </delay:FoodTemplateSelector.Tail>
                                </delay:FoodTemplateSelector>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
					 <Canvas x:Name="Local_result" Visibility="Collapsed" HorizontalAlignment="Center" Height="30" VerticalAlignment="Center" Width="300">
                    	<TextBlock TextWrapping="Wrap" Text="没有找到响应的信息"/>
                    </Canvas>
                </Grid>
    		</controls:PivotItem>
            <controls:PivotItem  x:Name="Taiwan" Tap="ListBox_Tap" Margin="12,0">
                <controls:PivotItem.Header>
                    <TextBlock Text="台湾"   Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.TitleBrush}"  FontSize="50" />
                </controls:PivotItem.Header>
                <Grid>
                    <ListBox ItemsSource="{Binding TypeAreaItems}" Loaded="ListBox_Loaded" Tap="ListBox_Tap">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <delay:FoodTemplateSelector x:Name="foodTemplateSelector" Content="{Binding}" RenderTransformOrigin="0.5,0.5">
                                    <delay:FoodTemplateSelector.RenderTransform>
                                        <CompositeTransform/>
                                    </delay:FoodTemplateSelector.RenderTransform>
                                    <delay:FoodTemplateSelector.Main>
                                        <DataTemplate >
                                            <StackPanel Orientation="Horizontal" Margin="10">
                                                <Ellipse Width="10" Height="10" Margin="0"
                                                  Stroke="#00ffffff"
                                                  StrokeThickness="1">
                                                    <Ellipse.Fill>
                                                        <SolidColorBrush Color="#025fae"/>
                                                    </Ellipse.Fill>
                                                </Ellipse>
                                                 <TextBlock Margin="15,0,0,0" TextWrapping="Wrap" Text="{Binding  Ppname}"  
												           Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.BlueAndBlack}" 
														   FontSize="30"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="(" 
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="{Binding Pnums}" 
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="款)"
												Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.GrayAndBlue}"
												           FontSize="24"/>
                                            </StackPanel>
                                        </DataTemplate>
                                    </delay:FoodTemplateSelector.Main>
                                    <delay:FoodTemplateSelector.Tail>
                                        <DataTemplate >
                                            <StackPanel Orientation="Horizontal">
                                                <TextBlock TextWrapping="Wrap" Margin="5,0,0,0"  Text="{Binding  Ppname}" Width="200" Height="80"/>

                                            </StackPanel>
                                        </DataTemplate>
                                    </delay:FoodTemplateSelector.Tail>
                                </delay:FoodTemplateSelector>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
					<Canvas x:Name="Taiwan_result" HorizontalAlignment="Center" Height="30" VerticalAlignment="Center" Width="300" Visibility="Collapsed">
                    	<TextBlock TextWrapping="Wrap" Text="没有找到响应的信息"/>
                    </Canvas>
                </Grid>
    		</controls:PivotItem>
    	</controls:Pivot>
        <Popup Width="480" Height="800" x:Name="SerchPop" >
        	<Canvas Background="Black" Height="800" Width="480" Tap="Canvas_Tap">
        		<TextBox x:Name="textresult" Tap="textresult_Tap"  TextWrapping="Wrap" Width="460" Height="150" Canvas.Left="10" Canvas.Top="30"/>
           </Canvas>
        </Popup>
    </Grid>
  
</phone:PhoneApplicationPage>
